
<template>
  <!--  票据类型-->
  <div v-if="props.param === 'titleTypeCode'">{{getTitleType(props.scope.titleTypeCode)}}</div>
  <!--  开票状态-->
  <div v-if="props.param === 'statusCode'">{{getInvoiceStatus(props.scope.statusCode)}}</div>

</template>
<script setup>
import {onMounted, ref, watch} from 'vue'
const props = defineProps({ scope: {default: ''}, param: {default: ''}})

const getTitleType = (typeCode) => {
  const titleTypeMap = {
    enterprise: '企业发票',
    person: '个人发票',
  }
  return titleTypeMap[typeCode]
}
const getInvoiceStatus = (value) => {
  const invoiceStatusMap = {
    effective: '已开发票',
    invalid: '已作废',
    non: '未开发票',
    reapplied: '已作废' //已经重新申请
  }
  return invoiceStatusMap[value]
}
onMounted(() => {
})
</script>

<style scoped>
</style>
